#include<iostream>
using namespace std;
int main()
{ 
    //int a, b, c;
	//a = b = c = 8;
	//a /= 2; b /= 2; c = a + b + c;
	//a /= 2; c /= 2; b = a + b + c;
	//b /= 2; c /= 2; a = a + b + c;
    int a, b, c, q, w, e;
	for (int x = 1; x <= 24; ++x)
	{
		for (int y = 1; y <= 24; ++y)
		{
			for (int z = 1; z <= 24; ++z)
			{
				if (x + y + z == 24)
				{
					q = x;
					w = y;
					e = z;
					x = x - y - z;
					y = y + y;
					z = z + z;
					y = y - x - z;
					x = x + x;
					z = z + z;
					z = z - x - y;
					x = x + x;
					y = y + y;
					if (x == y == z == 8) 
					{
						a = q;
						b = w;
						c = e;
						printf("%d %d %d\n", a, b, c);

					}
				}
			}
		}
	}
    //cout<<a<<b<<c<<endl;
    return 0;
}

